package edu.zut.process;


import java.util.Calendar;
import java.util.Scanner;

public class Demo2 {

    public static void main(String[] args) {
        //假设数字1-7代表周一 ---  周日
        Scanner scanner = new Scanner(System.in);
//        System.out.println("请用户输入数字 1 - 7");
//        int i = scanner.nextInt();
        //获取一个日历对象
        Calendar calendar = Calendar.getInstance();
        int i = calendar.get(Calendar.DAY_OF_WEEK) - 1;
//        System.out.println("i = " + i);
        //适合具体的判断
        switch (i){
            case 1:
                System.out.println("今天周一");
                break;
            case 2:
                System.out.println("今天周二");
                break;  //打断  跳出当前结构
            case 3:
                System.out.println("今天周三");
                break;
            case 4:
                System.out.println("今天周四");
                break;
            case 5:
                System.out.println("今天周五");
                break;
            case 6:
                System.out.println("今天周六");
                break;
            case 7:
                System.out.println("今天周日");
                break;
            default:
                System.out.println("输入错误");
                break;
        }


    }

}
